#include <iostream>
#include <map>
#include <string>
#include <utility>

using std::cout;
using std::endl;
using std::map;
using std::pair;
using std::string;
using std::make_pair;

template<typename Container>
void display(const Container &con)
{
    for(auto &ele:con)
    {
        cout << ele.first
             << " "
             << ele.second << endl;
    }
}

void test(){
    map<int,string> number = {
        {1,"阜阳"},
        {2,"上海"},
        pair<int,string>(3,"杭州"),
        pair<int,string>(4,"南京"),
        make_pair(5,"深圳"),
        make_pair(6,"无锡"),
        {1,"北京"}
    };
    display(number);

    cout << endl << "count查找" << endl;
    int temp = number.count(3);
    cout << "temp = " << temp << endl;

    cout << endl << "find查找" << endl;

}

int main()
{
    test();
    return 0;
}

